Skip to content

gh-149486: tarfile.data_filter: validate written link target#149487

Merged
encukou merged 3 commits intopython:mainfrom
encukou:tarfile-validate-written-link-target
May 8, 2026
Merged

gh-149486: tarfile.data_filter: validate written link target#149487
encukou merged 3 commits intopython:mainfrom
encukou:tarfile-validate-written-link-target

Conversation

@encukou
Copy link
Copy Markdown
Member

@encukou encukou commented May 7, 2026

gpshead and others added 3 commits May 4, 2026 19:14
The data filter rewrote linknames with normpath() but ran the
containment check against the un-normalised value, and computed a
symlink's directory before stripping trailing slashes.  Both let a
crafted archive create links pointing outside the destination.  Also
reject link members that resolve to the destination directory itself,
which could otherwise replace it with a symlink and redirect all
subsequent members.
@StanFromIreland StanFromIreland added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 7, 2026
@encukou encukou merged commit 5784119 into python:main May 8, 2026
69 checks passed
@miss-islington-app
Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13, 3.14, 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@encukou encukou deleted the tarfile-validate-written-link-target branch May 8, 2026 12:16
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 8, 2026

GH-149553 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 8, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 8, 2026

GH-149554 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 8, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 8, 2026

GH-149555 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label May 8, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 8, 2026

GH-149556 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants